<template>
	<view>
		<view class="pl30 pr30 pb30 pt30">
			<view class="" v-html="register_agreement" v-if="from==1"></view>
			<view class="" v-html="privacy_agreement" v-else></view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(opt) {
			if(opt.from==1) {
				uni.setNavigationBarTitle({
					title:'注册协议'
				})
				
			}else {
				uni.setNavigationBarTitle({
					title:'隐私协议'
				})
			}
			this.from=opt.from
		},
		onShow() {
			this.getconfig()
		},
		data() {
			return {
				from:'',
				//注册协议
				register_agreement:'',
				//隐私协议
				privacy_agreement:''
			};
		},
		methods:{
			getconfig() {
				this.$api.config().then(res=>{
					this.register_agreement=res.data.register_agreement
					this.privacy_agreement=res.data.privacy_agreement
				})
			}
		}
	}
</script>

<style lang="scss">

</style>
